#include <stdio.h>
#include "matrix.h"


/* Reads matrix A */
void read_matrix(float A[][N], int *ptr_n, int *ptr_m)
{
	printf("Input the size of the matrix: ");
	scanf("%d %d", ptr_n,ptr_m);

	printf("Input the %d x %d matrix:\n", *ptr_n, *ptr_m);
	for (int i = 0; i < *ptr_n; i++)
		for (int j = 0; j < *ptr_m; j++)
			scanf("%f", &A[i][j]);
}

/* Outputs matrix A */
void output_matrix(char *statement, float A[][N], int n,int m)
{
	printf(statement);
	for (int i = 0; i < n; i++) { // output i-th row
		for (int j = 0; j < m; j++)
			// output j-th element of i-th row
			printf("%5.2f ", A[i][j]);
		printf("\n");
	}
}

